/*************************************************************************
	> File Name: P1469.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-02-13 11:42:37
 ************************************************************************/

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int n, ans = 0;
    cin >> n;
    for (int i = 0, x; i < n; i++) {
        scanf("%d", &x);
        ans ^= x;
    }
    cout << ans << endl;
    return 0;
}
